package com.wswy.wzcx.module

import android.text.TextUtils
import com.wswy.wzcx.api.Configs
import com.wswy.wzcx.module.ad.AdConfig

object RuntimeContext {

    // 推广渠道 pay1csj
    private val PAY_CSJ_CONFIGS = hashMapOf("pay1csj" to AdConfig(Configs.TTAD_APPID,"803230996","903230496","903230396","903230989"))

    private var sPaidChannel:Boolean?=null

    /**
     * 付费推广渠道
     */
    @JvmStatic
    fun isPaidChannel():Boolean{

        if (sPaidChannel == null){
            sPaidChannel = TextUtils.equals("pay1csj",ChannelManager.getChannel())
        }

        return sPaidChannel?:false
    }

    @JvmStatic
    fun getPaidChannelAdConfig():AdConfig?{
        if (!isPaidChannel()){
            return null
        }
        return PAY_CSJ_CONFIGS.get(ChannelManager.getChannel())
    }

}